import { Component, OnInit } from '@angular/core';
import { DomSanitizer } from "@angular/platform-browser";

@Component({
  selector: 'app-note-detail',
  templateUrl: './note-detail.component.html',
  styleUrls: ['./note-detail.component.css'],
})
export class NoteDetailComponent implements OnInit {

  data = {
    title: '这是一个标题',
    content: '<p>asdasdasd</p>',
    updateTime: '2017-03-22'
  };
  transferContent;

  constructor(private sanitizer : DomSanitizer) { }

  ngOnInit() {
    this.transferContent = this.sanitizer.bypassSecurityTrustHtml(this.data.content);
  }

}
